package com.ruoyi.system.controller;




import com.ruoyi.common.core.domain.R;

import com.ruoyi.system.domain.dto.CreditCaseCriteria;
import com.ruoyi.system.domain.dto.TestDto;
import com.ruoyi.system.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;



@RestController
@RequestMapping("/test")
public class TestController {

    @Autowired
    TestService testService;

    @PostMapping("/getTestByPage")
    public R export(@RequestBody CreditCaseCriteria creditCaseLogCriteria)
    { ;
        return R.ok(testService.getTestByPage(creditCaseLogCriteria));
    }

    @PostMapping("/addTest")
    public R addTest(@RequestBody TestDto creditCaseDto){
        testService.addTest(creditCaseDto);
        return R.ok("添加成功");
    }

    @PostMapping("/delTest")
    public R delTest(@RequestBody TestDto creditCaseDto){
        testService.delTest(creditCaseDto);
        return R.ok("删除成功");
    }

    @PostMapping("/updateTest")
    public R updateTest(@RequestBody TestDto creditCaseDto){
        testService.updateTest(creditCaseDto);
        return R.ok("锁定成功");
    }




}
